package com.ccys.doctor.controller;

import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.dto.doctor.patientHistory.DoctorVerifyPackedMedicationDto;
import com.ccys.db.vo.doctor.login.ProfileVo;
import com.ccys.db.vo.doctor.patientHistory.DoctorGetBookingDetailVo;
import com.ccys.db.vo.doctor.patientHistory.GetBloodPressureHistoryVo;
import com.ccys.doctor.service.PatientHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: WhiteCoat
 * @description: 患者历史相关接口
 * @author: ZhangJingCan
 * @create: 2024-02-06 13:13
 **/

@RestController
@Api(tags = "患者历史相关接口")
@RequestMapping("patientHistory")
public class PatientHistoryController {

    @Autowired
    private PatientHistoryService patientHistoryService;

    @ApiOperation("获取当前问诊患者信息")
    @GetMapping(value = "/GetConsultingPatient")
    public ResponseResultApp<ProfileVo.ActiveBooking> getConsultingPatient() {
        return patientHistoryService.getConsultingPatient();
    }

    @ApiOperation("获取患者历史血压记录列表集合")
    @GetMapping(value = "/GetBloodPressureHistory")
    public ResponseResultApp<GetBloodPressureHistoryVo> getBloodPressureHistory(String member_id) {
        return patientHistoryService.getBloodPressureHistory(member_id);
    }

    @ApiOperation("")
    @GetMapping("/GetSwabberConsultHistoryDetail")
    public ResponseResultApp getSwabberConsultHistoryDetail(String booking_id){
        return ResponseResultApp.success("The booking could not be found.",null);
    }
    @GetMapping("/GetBookingInfoForApproval")
    public ResponseResultApp getBookingInfoForApproval(String booking_id){
        return patientHistoryService.getBookingInfoForApproval(booking_id);
    }

    @GetMapping("/GetBookingInfo")
    public ResponseResultApp getBookingInfo(String booking_id){
        return patientHistoryService.getBookingInfo(booking_id);
    }

    @GetMapping("/GetBookingDetail")
    public ResponseResultApp<DoctorGetBookingDetailVo> getBookingDetail(String booking_id){
        return patientHistoryService.getBookingDetail(booking_id);
    }

    @PostMapping("/VerifyPackedMedication")
    public ResponseResultApp verifyPackedMedication(@RequestBody DoctorVerifyPackedMedicationDto dto){
        return patientHistoryService.verifyPackedMedication(dto);
    }

}
